home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AM/FM: Amiga Musicians' Freeware Magazine 13
/
AM-FM 13.adf
/
utilities
/
RxTracker.doc.pp
/
RxTracker.doc
Wrap
Text File
|
1992-11-07
|
11KB
|
301 lines
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
RxTracker
- A Program for playing MED and Soundtracker modules from ARexx -
by
Dominic Giampaolo
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
NOTE FROM AM/FM:
This program and all it's accompanying +
+ files are stored in a
self-extracting, LHA-compressed
+
+ package in the "Utilities" directory of this disk. To +
+ extract all the individual files and make the program ready +
+ for use, make sure you are positioned on a disk where you +
+ have enough free space, and just type the path and filename +
+ to the LHA-package; which is called "prog-name.RUN". If you +
+ are having problems, there is a more detailed description of +
+ how to handle this extraction in the USING AM/FM article. +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Have you noticed that AmigaVision only plays those really crappy Deluxe
Music Construction Set SMUS files? The ones that sound like they were
taken from a Commodore 64?
Well I did.
I also noticed that SoundTracker/MED produce music that is an order of
magnitude better. As a matter of fact, if I was blindfolded and didn't
know, I wouldn't believe the music was coming from the same computer.
This is why I wrote RxTracker. It lets you play MED and SoundTracker
modules via ARexx. This means that you are no longer forced to listen to
those crappy DMCS files in your AmigaVision presentation. It also means
you can play songs from within your editor, spreadsheet, paint program, or
even a telecommunications program! Now tell me ARexx isn't the most killer
thing on earth....
Oh, one quick thing. The medplayer.library will ONLY play files saved from
the 2.0 or higher version of MED. For a module to be loaded as a MED
module, the first 4 bytes of the file must be (in ascii) MMD0. You can see
if a file is a good MED module by doing "type hex <modulename>". If the
first thing you see is MMD0, you're all set. If not, fire up MED, load the
module, and just save it back out again.
ADDITIONAL NOTES : I'm now including a few ARexx scripts that you can use
to test things out. Look in the Rexx directory. They are all very
straightforward and easy to use. You should be able to use them directly
from AmigaVision or from the CLI or wherever.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Requirements :
Obviously you need ARexx.
You also need to have both medplayer.library and streplay.library in
your libs: directory. Both of them total less than 9K, and are worth
sparing the disk space for (if you only have two floppies and things are
really just too tight, get PathAss from a fish disk or PD archive, and it
will let you split LIBS: across two disk - very handy!). Both librariers
are included here, and are copyright/left/center their respective authors
(i.e. I didn't write either one).
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
How to use RxTracker :
It is rather simple. Just run (or runback) rxtracker. In AmigaVision
you would use the Execute icon to run rxtracker as a CLI program. From
ARexx you would do the following :
/* fire up rxtracker in the background (assuming it's in c:) */
address command "run rxtracker"
Or you can put it in your startup-sequence, or you can just run it
manually from the CLI.
******** NOTE: When using the Execute Icon in AV, you need to have the
RUN command in your C: directory. On the 3000 I am using
for some reason there is no RUN command at all. Not on the
HD or on the floppies that came with the computer. If you
have the same problem, use a public domain RunBack instead.
RxTracker then opens a public port called RXTRACKER. Now you have to use
ARexx to be able to access RxTracker.
A sample ARexx script would look like the following (assuming that
RxTracker is already running) :
/* tell rxtracker to load a song */
address RXTRACKER LOAD "work:modules/mod1/mod.killer"
/* now tell rxtracker to start it playing */
address RXTRACKER PLAY
delay(300) /* let song play for a while */
/* now tell it to stop */
address RXTRACKER STOP
/* now tell it to quit */
address RXTRACKER QUIT
******* NOTE: Again more 2.0 strangeness. Under earlier version of ARexx
there was a function called Delay() which would wait for a
specified amount of time. Under the 2.0 version of ARexx, it
no longer exists. This is really gay, but that's how it is.
If you need to wait, just do : address command "wait 2"
The basic idea is very straightforward. You tell RxTracker to load a
module, by giving it the name of either a Soundtracker or MED module (it
figures things out). This loads up a "current" module. Then you issue a
PLAY command, and viola, your ears are graced with the sound of music!
To stop the noise, issue a STOP command. One thing to note here, when you
stop the music, the current module STAYS loaded. You can start it playing
again with a PLAY command, or you can UNLOAD it (or you can just issue
another LOAD command). The complete command list is right below.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
RxTracker Command List :
This is the command list that RxTracker understands. To use these
commands you must do the following from ARexx :
address RXTRACKER <command name> [any arguments]
That line above instructs ARexx to "talk" to RxTracker, and give it
anything on the line following the word RXTRACKER.
Here's the official command list :
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1. LOAD <some filename>
Purpose : Load into chip memory either a Soundtracker or MED module.
You do _not_ need to know which kind the file is, everything is
taken care of for you.
Notes : Once the module is loaded, you must issue a PLAY command if you
want to hear anything.
It is usually a very good idea to specify a _complete_ pathname
for the song you want to play. Otherwise, RxTracker will only be
able to see files in the current directory at the time you ran
RxTracker. !!!THIS IS IMPORTANT TO REMEMBER!!! When you specify
a full path name, always put it in double quotes.
If the module name you gave wasn't really a module, you will
get back a return code of 5.
Example : (all examples are in ARexx)
/* load a song from dh0:music/modules */
address RXTRACKER LOAD "dh0:music/modules/mod.really_neat_song"
/* load the song df1:mods/mod.7 */
address RXTRACKER LOAD "df1:mods/mod.7"
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2. PLAY
Purpose : To play a currently loaded module.
Notes : If no module is currently loaded, nothing will happen.
Examples : (in ARexx)
/* play an already loaded module (see above) */
address RXTRACKER PLAY
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
3. STOP
Purpose : To stop a currently playing module.
Notes : If no module is being played, nothing will happen.
After this call, the module that was playing is still in CHIP
memory, and can be started up again using a PLAY command.
Examples : (in ARexx)
/* stop a playing module (started from the PLAY command) */
address RXTRACKER STOP
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
4. UNLOAD
Purpose : Stop a currently playing module and unload it from memory.
Notes : You do not need to call STOP before calling this function, it
does it for you (if a module is playing).
Example : (in ARexx)
/* instead of using STOP, we'll just use unload */
address RXTRACKER UNLOAD
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
5. QUIT
Purpose : Make RxTracker quit. Causes any currently playing modules to
be unloaded, and frees up all resources.
Notes : This is the only way to make RxTracker quit. It is also very
convienent in that it stops and unloads any music that is
playing.
Example : (in ARexx)
/* we're done now, let's quit, make the music stop (and free up mem) */
address RXTRACKER QUIT
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Additional commands for use with MED modules :
The medplayer.library offers a few other features that the
STReplay.library does not. These commands only work with MED modules. If
you try to use them on SoundTracker modules, nothing will happen.
6. FADEOUT
Purpose : To nicely fade out a currently playing module.
Notes : This command is a little weird in that it can be a
difficult to gauge when a song will have actually finished
fading out. Be careful using this command (I don't think it
will crash anything, but I could be wrong).
Example : (in ARexx)
/* assuming a song is already playing */
address RXTRACKER FADEOUT
/* now wait a bit for the song to finish */
delay(150)
/* and finally unload the song */
address RXTRACKER UNLOAD
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
7. CONTINUE
Purpose : To continue playing a module at the point you called STOP
Notes : If you need to stop the music for whatever reason, and then
want it to pick back up where it was, use this command instead
PLAY.
Example :
/* first start the med module playing (assuming it's playing) */
address RXTRACKER CONTINUE
/* now we stop it */
address RXTRACKER STOP
delay(50) /* wait a while */
/* start it playing where we left off */
address RXTRACKER CONTINUE
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
That about covers it all. If you have any questions, comments, bug
reports, or just want to say hi/thanks/you're a jerk, send mail to :
uunet!chopin!nick
or
nick@worthen.georgetown.edu
or (yucky mainframe account)
giampal@auvm.bitnet
In the true spirit of free software, you can freely pass this program
around, just keep my name attatched to it, and don't sell it for gobs of
money.
thanks,
--domininc